package com.dhecp.project.statistics.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.dhecp.core.constant.DataFiltering;
import com.dhecp.core.utils.PageUtils;
import com.dhecp.project.statistics.domain.BankMoneyDetail;
import com.dhecp.project.statistics.mapper.BankMoneyDetailMapper;
import com.dhecp.project.statistics.service.BankMoneyDetailService;
import com.dhecp.project.system.service.SysDictionaryForFieldService;

/**
 * 银行日记账  业务实现层
 * @author DH-lwl
 * @version 2020年6月29日
 */
@Service
public class BankMoneyDetailServiceImpl implements BankMoneyDetailService {

	@Autowired
	private BankMoneyDetailMapper bankMoneyDetailMapper;

	@Autowired
	private SysDictionaryForFieldService dictionaryForFieldService;
	
	/**
	 * 查询所有信息
	 * @param params
	 * @return List-BankMoneyDetail
	 * @author lwl
	 * @throws Exception 
	 */
	@Override
	public List<BankMoneyDetail> queryAll(Map<String, Object> params) throws Exception {
		params.put(DataFiltering.DATA_WHERE, dictionaryForFieldService.getWhereStr(params));	//常规查询条件SQL语句
        params.put(DataFiltering.DATA_SCODE, dictionaryForFieldService.getDataScode(params));	//数据权限查询条件SQL语句

        if (params.get("field") == null || params.get("field") == ""){
			String orderBy = "bDate asc";
			PageUtils.startPageOrder(orderBy);
		}else{
			PageUtils.startPage();	
		}
		return bankMoneyDetailMapper.findAll(params);
	}

}
